package cn.com.shopec.erp.stock.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * @ClassName: StockInProd
 * @Description: 入库商品实体类
 * @author: zengxuezhou
 * @date: 2016年11月28日 下午2:26:52
 */
@Entity
@Table(name = "TBL_STOCKIN_PRODUCT")
public class StockInProduct implements Serializable {

	private static final long serialVersionUID = 8792016278154286340L;

	/** id **/
	private String id;

	/** 入库单号 **/
	private String stockInNo;
	
	/** 采购单号 **/
	private String purNo;
	
	/** 采购商品单号 **/
	private String  purProdNo;
	
	/** 供应商编号**/
	private String supNo;
	
	/** 供应商编号**/
	private String supName;
	
	/** 商品编号 **/
	private String commoNo;

	/** 货物编号 **/
	private String prodNo;

	/** 货物成本 **/
	private Double prodCost;

	/** 货物描述 **/
	private String prodDesc;

	/** 总数量 **/
	private Long prodTotal;
	
	/** 条形码是否已有 **/
	private Integer productCodeState;

	/** 良品数量 **/
	private Long qualifiedQuantity;

	/** 次品数量 **/
	private Long defectiveQuantity;
	
	/** 次品原因 */
	private String defectiveReason;

	/** 创建人员 **/
	private String creater;

	/** 创建日期 **/
	private Date createTime;

	/** 修改人员 **/
	private String updater;

	/** 修改日期 **/
	private Date updateTime;

	/**删除标识**/
	private Integer deletedFlag;

	@Id
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "STOCKIN_NO")
	public String getStockInNo() {
		return stockInNo;
	}

	public void setStockInNo(String stockInNo) {
		this.stockInNo = stockInNo;
	}

	@Column(name = "PROD_NO")
	public String getProdNo() {
		return prodNo;
	}

	public void setProdNo(String prodNo) {
		this.prodNo = prodNo;
	}

	@Column(name = "PROD_COST")
	public Double getProdCost() {
		return prodCost;
	}

	public void setProdCost(Double prodCost) {
		this.prodCost = prodCost;
	}

	@Column(name = "PROD_DESC")
	public String getProdDesc() {
		return prodDesc;
	}

	public void setProdDesc(String prodDesc) {
		this.prodDesc = prodDesc;
	}

	@Column(name = "PROD_TOTAL")
	public Long getProdTotal() {
		return prodTotal;
	}

	public void setProdTotal(Long prodTotal) {
		if (prodTotal == null) {
			this.prodTotal = 0l;
		}
		this.prodTotal = prodTotal;
		
	}

	@Column(name = "QUALIFIED_QUANTITY")
	public Long getQualifiedQuantity() {
		return qualifiedQuantity;
	}

	public void setQualifiedQuantity(Long qualifiedQuantity) {
		if (qualifiedQuantity == null) {
			this.qualifiedQuantity = 0l;
		} else {
			this.qualifiedQuantity = qualifiedQuantity;
		}
	}

	@Column(name = "DEFECTIVE_QUANTITY")
	public Long getDefectiveQuantity() {
		return defectiveQuantity;
	}

	public void setDefectiveQuantity(Long defectiveQuantity) {
		if (defectiveQuantity == null) {
			this.defectiveQuantity = 0l;
		} else {
			this.defectiveQuantity = defectiveQuantity;
		}

	}

	@Column(name = "CREATE_TIME")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "CREATER")
	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}

	@Column(name = "UPDATER")
	public String getUpdater() {
		return updater;
	}

	public void setUpdater(String updater) {
		this.updater = updater;
	}

	@Column(name = "UPDATE_TIME")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "DELETED_FLAG")
	public Integer getDeletedFlag() {
		return deletedFlag;
	}

	public void setDeletedFlag(Integer deletedFlag) {
		this.deletedFlag = deletedFlag;
	}

	@Column(name = "COMMO_NO")
	public String getCommoNo() {
		return commoNo;
	}

	public void setCommoNo(String commoNo) {
		this.commoNo = commoNo;
	}

	@Column(name = "PUR_NO")
	public String getPurNo() {
		return purNo;
	}

	public void setPurNo(String purNo) {
		this.purNo = purNo;
	}
	
	@Column(name = "SUP_NO")
	public String getSupNo() {
		return supNo;
	}

	public void setSupNo(String supNo) {
		this.supNo = supNo;
	}
	
	@Column(name = "PRODUCT_CODE_STATE")
	public Integer getProductCodeState() {
		return productCodeState;
	}

	public void setProductCodeState(Integer productCodeState) {
		this.productCodeState = productCodeState;
	}

	@Column(name = "PUR_PROD_NO")
	public String getPurProdNo() {
		return purProdNo;
	}

	public void setPurProdNo(String purProdNo) {
		this.purProdNo = purProdNo;
	}
	
	@Column(name = "DEFECTIVE_REASON")
	public String getDefectiveReason() {
		return defectiveReason;
	}

	public void setDefectiveReason(String defectiveReason) {
		this.defectiveReason = defectiveReason;
	}

	@Column(name = "SUP_NAME")
	public String getSupName() {
		return supName;
	}

	public void setSupName(String supName) {
		this.supName = supName;
	}
}